package org.dromara.hrp.domain;

import org.dromara.common.tenant.core.TenantEntity;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import jakarta.validation.constraints.*;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serial;

/**
 * 联系人合作伙伴对象 hrp_partner
 *
 * @author wenrui Su
 * @date 2024-05-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hrp_partner")
public class HrpPartner extends TenantEntity {

  @Serial
  private static final long serialVersionUID=1L;


  @ExcelProperty(value = "id")
  @NotNull(message = "id不能为空", groups = { EditGroup.class })
  @TableId(value = "id")
  private Long id;

  @ExcelProperty(value = "上级id")
  private Long parentId;

  @ExcelProperty(value = "名称")
  @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
  private String name;

  @ExcelProperty(value = "编码")
  private String code;

  @ExcelProperty(value = "性别", converter = ExcelDictConvert.class)
  @ExcelDictFormat(dictType = "sys_user_sex")
  private String sex;

  @ExcelProperty(value = "手机号")
  @NotBlank(message = "手机号不能为空", groups = { AddGroup.class, EditGroup.class })
  private String mobile;

  @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
  @ExcelDictFormat(dictType = "sys_status")
  @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
  private String status;

  @ExcelProperty(value = "固定电话")
  private String telephone;

  @ExcelProperty(value = "邮箱")
  private String email;

  @ExcelProperty(value = "标识")
  private String logo;

  @ExcelProperty(value = "网站地址")
  private String website;

  @ExcelProperty(value = "信用编码")
  private String idCard;

  @ExcelProperty(value = "成立日期")
  private Date birthday;

  @ExcelProperty(value = "评分")
  private Long score;

  @ExcelProperty(value = "地址")
  private String address;

  @ExcelProperty(value = "是否客户")
  private Boolean isCustomer;

  @ExcelProperty(value = "是否供应商")
  private Boolean isSupplier;

  @ExcelProperty(value = "图片")
  private String picture;

  @ExcelProperty(value = "生产商否")
  private Boolean isManufacturer;

  @ExcelProperty(value = "备注")
  private String remark;
}
